<?php echo View::make('home.common.header'); ?>

<div class="mod-crumbs">
    <b>搜索结果</b>
    <span>
        <i>&gt;</i>找到相关课程：(<em></em>)
    </span>
</div>

<div class="search category mb10">
    <div class="detail">
        <ul class="clearfix">
			<?php foreach($data[0] as $key => $value):?>
            <li><a href="/search?category_id=<?php echo $value[0];?>&wd=<?php echo rawurlencode($wd);?>"><?php echo $value[1];?><span>(<?php echo $value[2];?>)</span></a></li>
			<?php endforeach;?>
        </ul>

        <dl id="doctype">
            <dt>课程类型:</dt>
            <dd><a href="" doctype="0" style="background-color: rgb(0, 101, 203); color: rgb(255, 255, 255);">全部课程</a></dd>
            <dd><a href="" doctype="1">直播课程</a></dd>
            <dd><a href="" doctype="2">视频课程</a></dd>
            <dd><a href="" doctype="4">系列课程</a></dd>
            <dd><a href="" doctype="3">课程合集</a></dd>
        </dl>
    </div>
    
     <div class="tab-s1">
        <span>排序：</span>
        <div class="btn-group">
            <a href="/course?listType=1&amp;type=12" class="btn-tab first active" id="hotCourse">热门</a>
            <a href="/course?listType=4&amp;type=12" class="btn-tab" id="newCourse">推荐</a>
            <a href="/course?listType=3&amp;type=12" class="btn-tab" id="">最新</a>
            <a href="/course?listType=2&amp;type=12" class="btn-tab" id="latestCourse">即将</a>
            <a href="/course?listType=5&amp;type=12&amp;priceDesc=" class="btn-tab last">价格<i class="ico-up"></i></a>
        </div>
    </div>
</div>

<div class="search-list">
    <ul>
			<?php foreach($data[1]->results as $key => $value):?>

        <li>
            <a href="/course?id=<?php echo $value['id']?>&category_id=<?php echo $value['category_id']?>" class="pic">
                <img src="<?php echo $value['image']?>" alt=""></a>
            <div class="cont">
                <h3><a href="/course?id=<?php echo $value['id']?>&category_id=<?php echo $value['category_id']?>" ><?php echo $value['title']?></a></h3>
                <p>课程价格：<strong><?php echo $value['price']?></strong></p>
                <div class="course-introduction-hidden" style="display: none">
                    <pre>
						<?php echo $value['desc_abstract']?>
                    </pre>
                </div>
                <p><b>课程简介：</b>
                    <em class="course-introduction">
						<?php echo $value['desc_abstract']?>
                    </em>
                </p>
            </div>
            <div class="actions">
                         <a href="/course?id=<?php echo $value['id']?>&category_id=<?php echo $value['category_id']?>">
                             <button class="btn btn-large btn-info" type="button">查看详情</button>
                         </a>
                        <p>创建时间：<?php $value['ctime']?></p>
            </div>
        </li>
		<?php endforeach;?>
       
    </ul>
</div>


 <div class="pagination">
	<?php echo $data[1]->appends(array('wd'=>rawurlencode($wd)))->links();?>
    </div>



<?php echo View::make("home.common.footer"); ?>
